package day6;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileStream3 {
    public static void main(String[] args) {
        FileInputStream fin=null;
        try {
            fin = new FileInputStream("E:\\temp\\java75\\namelist.txt");
            byte []b=new byte[fin.available()];//对于大文件不合适
            int len=fin.read(b);
            String str=new String(b,0,len);
            System.out.println(str);
            fin.close();//不合适
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
